package be.shoktan.tutorial.chapterTwo;

import org.apache.log4j.Logger;

import be.shoktan.tutorial.BaseAction;

public class HelloWorld extends BaseAction{
	private static final long serialVersionUID = -1639668102157495014L;
	private static final String GREETING = "Hello ";
    private static final Logger LOG = Logger.getLogger(HelloWorld.class);
    
	
    public String execute(){
    	if(LOG.isTraceEnabled())LOG.trace("executing");
    	setCustomGreeting(GREETING + getName());
    	if(LOG.isTraceEnabled())LOG.trace("execution successfull");
    	return SUCCESS;
    }
    
    private String name;
    private String customGreeting;
    
    public String getName() {
    	return name;
    }
    public void setName(String name) {
    	this.name = name;
    }
    public String getCustomGreeting() {
    	return customGreeting;
    }
    public void setCustomGreeting(String customGreeting) {
    	this.customGreeting = customGreeting;
    }
}
